.setup-root {
  display: block;
  width: 100%;
  min-height: 100%; // An explicit height: 100% loses the background color behind the logo when scrolling.
  position: relative;
  padding-left: 64px;
  padding-right: 64px;
  padding-top: 32px;
  padding-bottom: 32px;
  background-color: #303030;
}

.setup-page-content {
  background-color: #efefef;
  padding: 32px;
  margin-left: auto;
  margin-right: auto;
  max-width: 900px;
}

.setup-page-title {
  margin-top: 0;
  margin-bottom: 32px;
  font-weight: normal;
  text-align: center;
}

.setup-help-row {
  margin-left: auto;
  margin-right: auto;
  max-width: 900px;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;

  background-color: #303030;
  color: #ffffff;

  .setup-help-label {
    display: inline-block;
    margin-right: 1em;
    font-size: 13px;
  }

  .setup-help-link {
    display: inline-block;
    @extend %button-base;
    @extend %button-dark;
    font-weight: normal; // overriding default bold links
    margin: 4px;
    text-decoration: none;
  }

  .setup-system-log {
    color: #000000;
  }

  .setup-system-log-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    .setup-system-log-header-text {
      font-size: 24px;
      font-weight: normal;
    }
  }
}

.setup-intro-instruction-block {
  text-align: center;
  margin-top: 1em;
  margin-bottom: 1em;
}

.setup-intro-instruction {
  margin: 0;
}

.setup-intro-instruction-deemphasized {
  margin: 0;
  color: #888;
}

.setup-progress {
  margin-bottom: 32px;
}

.setup-progress-labels {
  margin-top: 0;
  margin-bottom: 8px;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
}

.setup-current-step {
  color: black;
}

span.setup-not-current-step {
  color: #888;
}

a.setup-not-current-step {
  text-decoration: none;
}

.setup-progress-step {
  // base percent to flex: should be 100%/(num_steps + 1) to make the steps' labels line up with
  // the endpoints of the progress bars below, but the number of steps varies, so we need to set
  // the size depending on how many there are.
  &.of-four {
    flex: 0 1 20%;
  }
  &.of-five {
    flex: 0 1 16.66%;
  }
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

.setup-progress-bar {
  display: flex;
  >* {
    flex: 1;
    height: 12px;
    border-left: 1px solid #9A94A0;
  }
  :last-child {
    border-right: 1px solid #9A94A0;
  }

  .complete {
    background-color: #6e3c8e;
  }
  .incomplete {
    background-color: #e9e4ef;
  }
}

button.setup-sandstorm {
  text-align: center;
  width: 300px;
  margin: 0 auto;
  display: block;
  @extend %button-base;
  height: 32px;
  font-size: 16px;
  background-color: #962751;
  color: white;
  border: 1px solid darken(#962751, 10%);
  &:hover {
    background-color: lighten(#962751, 10%);
  }
  &:disabled {
    @extend %button-disabled;
  }
}

.setup-organization-management-form {
  h4 {
    font-size: 20px;
  }
  .org-options-group {
    display: block;
    position: relative;
    padding-left: 24px;
    margin-bottom: 20px;
    input[type=checkbox] {
      position: absolute;
      margin-left: -24px;
      font-size: 16px;
    }
    &::after {
      border-bottom: 1px solid #ddd;
    }
  }
  .form-group {
    margin-bottom: 10px;
  }
  label {
    display: block;
    font-weight: normal;
    font-size: 20px;
  }
  input[type=text] {
    display: block;
    background-color: white;
    padding: 4px;
    font-size: 16px;
    border-radius: 2px;
    border: 1px solid #d3d3d3;
  }
  .form-subtext {
    font-size: 14px;
    color: #666;
  }
}

.setup-preinstall {
  [role=grid] {
    margin-bottom: 10px;

    [role=row] {
      display: flex;
      flex-direction: row;
      justify-content: flex-start;
      border-top: 1px solid $default-table-border-color;
      flex-basis: 0;
      width: 100%;

      &.checked, &.toggle-more {
        background-color: white;
        [role=row] {
          border-top: 1px solid $default-content-background-color;
        }
      }

      &.toggle-more {
        cursor: pointer;
        div {
          margin-left: auto;
        }
      }

      [role=gridcell] {
        padding: 4px;
        overflow: hidden;
        @include overflow-ellipsis();
        flex-grow: 0;
        &.name {
          width: 20%;
        }
        &.description {
          width: 70%;
          color: #888888;
        }
        &.download {
          width: 130px;
          color: #888888;
          i.download-checkmark {
            color: green;
            @extend .icon;
            @extend .icon-check;
            margin-right: 5px;
          }
          i.download-x-mark {
            color: red;
            @extend .icon;
            @extend .icon-plus;
            margin-right: 5px;
            -ms-transform: rotate(45deg);
            -webkit-transform: rotate(45deg);
            transform: rotate(45deg);
          }
          progress {
            width: 115px;
            &::-webkit-progress-value {
              background-color: green;
            }
          }
        }
      }
    }
  }
}

.setup-next-steps {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  >* {
    margin-left: 10px;
  }
  margin-bottom: 15px;
}

.setup-button-row {
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  justify-content: flex-start;
}

.setup-next-button {
  @extend %button-base;
  @extend %button-primary;
  margin-left: 10px;
}

.setup-back-button {
  @extend %button-base;
  @extend %button-secondary;
  margin-right: auto;
}

.setup-test-email-button, .setup-skip-email, .setup-skip-button {
  @extend %button-base;
  @extend %button-secondary;
  margin-left: 10px;
}

.setup-button-primary {
  @extend %button-base;
  @extend %button-primary;
}

.setup-button-secondary {
  @extend %button-base;
  @extend %button-secondary;
}

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.make-self-admin, .sign-in-button, .admin-settings-button, .rerun-wizard-button {
  @extend %button-base;
  display: block;
  width: 200px;
}

.make-self-admin, .sign-in-button, .admin-settings-button {
  @extend %button-primary;
}

.rerun-wizard-button {
  @extend %button-secondary;
}

.sandstorm-logo-row {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.sandstorm-logo {
  display: block;
  flex: none;
  width: 200px;
  height: 200px;
  @extend %pseudo-img-tag;
  background-image: url('/sandstorm-gradient-logo.svg')
}
